<%@ page language="java" contentType="text/html; charset=UTF-8"	pageEncoding="UTF-8"%>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags"%>


<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="robots" content="follow, index" />
<meta name="author" content="iune co." />
<meta name="description"
	content="IUNE有最好的库存管理SaaS软件。以更快更高的准确度，跟进实时数据的访问和库存移动。" />
<meta name="keywords"
	content="库存, 存货管理, 库存管理, 仓库管理, 云ERP, 云逸ERP, 中小型企业云ERP, SaaS ERP软件/系统" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title></title>


<style type="text/css">
td {
	padding: 0px;
	width: 100px;
}

</style>

</head>
<body>



	<div class="container-fluid" data-ng-controller="customerGroupTreeCtrl as Model">

		<div class="row">
			<div class="col-sm-12">
				<nav class="nav">
					<ul class="pagination navbar-left buttonBar">
						<li>
							<div class="btn-group" role="toolbar">
								<!-- Split button -->
								<shiro:hasPermission name="/customer/customerGroup/tree:create">
								<div class="btn-group">
									<button type="button" class="btn btn-info "
										data-ng-disabled="!Model.dataMaster.readonly()"
										data-ng-click="Model.addRoot();">
										<span class="glyphicon glyphicon-plus"></span> 新建根节点
									</button>
									  <button type="button" class="btn btn-info dropdown-toggle" 
										  data-ng-disabled="!Model.dataMaster.readonly()"
										  data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
									    <span class="caret"></span>
									    <span class="sr-only">Toggle Dropdown</span>
									  </button>
									  <ul class="dropdown-menu">
									    <li><a href="#" data-ng-click="Model.addChild();">新建子节点</a></li>
									    <li><a href="#" data-ng-disabled="Model.dataMaster.currentIndex==null" data-ng-click="Model.addBrother()">新建兄弟节点</a></li>
									    <li role="separator" class="divider"></li>
									    <li><a href="#" data-ng-click="Model.addRoot()">新建根节点</a></li>
									  </ul>
								</div>
								</shiro:hasPermission>
								<!-- Split button结束 -->
								<shiro:hasPermission name="/customer/customerGroup/tree:save">
								<button type="button" class="btn btn-default"
									data-ng-disabled="Model.dataMaster.currentIndex==null"
									data-ng-show="Model.dataMaster.readonly()"
									data-ng-click="Model.edit();">
									<span class="glyphicon glyphicon-edit"></span> 修改
								</button>
								</shiro:hasPermission>
								<button type="button" class="btn btn-success "
									data-ng-show="!Model.dataMaster.readonly()"
									data-ng-click="Model.save();">
									<span class="glyphicon glyphicon-floppy-save"></span> 保存
								</button>
								<button type="button" class="btn btn-warning "
									data-ng-show="!Model.dataMaster.readonly()"
									data-ng-click="Model.saveCancel();">
									<span class="glyphicon glyphicon-floppy-open"></span> 取消
								</button>
								<shiro:hasPermission name="/customer/customerGroup/tree:delete">
								<button type="button" class="btn btn-default"
									data-ng-show="Model.dataMaster.readonly()"
									data-ng-disabled="!Model.dataMaster.readonly() || Model.dataMaster.currentIndex==null"
									data-ng-click="Model.remove()">
									<span class="glyphicon glyphicon-trash"></span> 删除
								</button>
								</shiro:hasPermission>
								<shiro:hasPermission name="/customer/customerGroup/tree:query">
								<button type="button" class="btn btn-default"
									data-ng-disabled="!Model.dataMaster.readonly()"
									data-ng-click="Model.refresh()">
									<span class="glyphicon glyphicon-refresh"></span> 刷新
								</button>
								</shiro:hasPermission>
								<shiro:hasPermission name="/customer/customerGroup/tree:save">
								<button type="button" class="btn btn-danger"
									data-ng-disabled="!Model.dataMaster.readonly()"
									data-ng-click="Model.move()">
									<span class="glyphicon glyphicon-transfer"></span> 移动
								</button>
								</shiro:hasPermission>
								<!-- Split button -->
								<shiro:hasPermission name="/customer/customerGroup/tree:save">
								<div class="btn-group">
								<button type="button" class="btn btn-warning"
									data-ng-disabled="!Model.dataMaster.readonly()"
									data-ng-click="Model.sort()">
									<span class="glyphicon glyphicon-sort"></span> 排序
								</button>
									  <button type="button" class="btn btn-warning dropdown-toggle" 
										  data-ng-disabled="!Model.dataMaster.readonly()"
										  data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
									    <span class="caret"></span>
									    <span class="sr-only">Toggle Dropdown</span>
									  </button>
									  <ul class="dropdown-menu">
									    <li><a href="#" data-ng-click="Model.sort('root');">根节点排序</a></li>
									  </ul>
								</div>
								</shiro:hasPermission>
								<!-- Split button结束 -->
							</div>
						</li>
					</ul>
					<shiro:hasPermission name="/customer/customerGroup/tree:query">
						<query-like data="Model.dataMaster" place-holder="模糊查询..."></query-like>
					</shiro:hasPermission>
				</nav>

			</div>
		</div>
		
		
		<div class="row">
			<div class="col-sm-4">
				<div>
					<div tree-view 
						tree-data="Model.dataMaster" 
						checkbox-show="false"
						text-field="groupLabel" 
						value-field='fID' 
						parent-field='fParent'
						level-field='nodeLevel' 
						kind-field='nodeKind' 
						badge-show="nkLeaf"
						badge-field=""
						>
					</div>
				</div>
			</div>
			<div class="col-sm-8">
				<form class="form-horizontal" name="customer_customerGroup_single_form">

					<div class="form-group form-group-sm has-warning">
						<label class="col-sm-2 control-label">分类描述</label>
						<div class="col-sm-10">
							<input type="text" class="form-control"
								data-ng-model="Model.dataMaster.rows[Model.dataMaster.currentIndex].groupLabel.value"
								data-ng-readonly="Model.dataMaster.readonly();">
						</div>
					</div>

					<div class="form-group form-group-sm" ng-if="false">
						<label class="col-sm-2 control-label">全路径</label>
						<div class="col-sm-10">
							<input type="text" class="form-control"
								data-ng-model="Model.dataMaster.rows[Model.dataMaster.currentIndex].groupFullLabel.value"
								data-ng-readonly="true">
						</div>
					</div>

					<div class="form-group form-group-sm">
						<label class="col-sm-2 control-label">启用</label>
						<div class="col-sm-10">
							<input type="checkbox" class="form-control switch"
								data-ng-model="Model.dataMaster.rows[Model.dataMaster.currentIndex].status.value"
								bootstrap-switch data-size="small"
								can-input="Model.dataMaster.readonly()"
								data-ng-true-value="'open'" data-ng-false-value="'close'"/>
						</div>
					</div>

					<div class="form-group">
						<label class="col-sm-2 control-label">备注</label>
						<div class="col-sm-10">
							<textarea rows="2" class="form-control"
								data-ng-model="Model.dataMaster.rows[Model.dataMaster.currentIndex].comments.value"
								data-ng-readonly="Model.dataMaster.readonly();">
						</textarea>
						</div>
					</div>

					
				</form>

			</div>

		</div>


	</div>





</body>

</html>

